<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWyReportDailyStatTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wy_report_daily_stat', function (Blueprint $table) {
            $table->increments('id')->comment('主键、自动增长');
            $table->date('date_stat')->comment('日期')->unique();
            $table->string('source_key', 30)->comment('调用方约定的数据来源key');
            $table->decimal('value', 17, 2)->comment('值');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wy_report_daily_stat');
    }
}
